\chapter{Writing}
\label{chap:writing}

\section{Text editors}
%
\subsection{Coding}
Editors come in different colors and shapes, for general purposes and specific purposes, such as web development editors. All editors listed below are open source. 
%
\begin{itemize}
  \item {\textbf{Vi} (or vim) is a general purpose text editor which is a part of any Unix operating system (available for download for Windows and Mac). The extended versions vim and gvim are also commonly installed (or can easily be). Vi is not a word processor and can not be used to typeset documents. There is no formatting or highlighting of regular text. But Vi is a powerful editor for writing lots of text, fast, without never ever crashing or scrabbling your text. It takes some time to get used to and requires an effort to familiarize with. I can however assure you that the reward is worth it. All actions in Vi are done via the keyboard. Not having to use the mouse increases efficiency of typing and avoids stress on your wrist. }
  \item \textbf{Emacs} is the second most used text editor (after vi) and includes over 1000 commands and macro functionality to automate work.  
\end{itemize}

\subsection{Formatted text}
To write a report, article and finally a thesis, you need a typesetting program i.e. an editor with formatting. The choices here are OpenOffice (or \textit{Microsoft Word}) or LaTex.
\begin{itemize}
  \item \textbf{OpenOffice} is the open source version of Microsoft Word and includes more or less the same functionality. The more or less part means that going from one to the other doesn't always work so well. OpenOffice is especially useful for short documents where typesetting is important and you will not edit it much after the first time. Preparing a table of contact people, a seminar program or similar in LaTeX will probably take longer than doing it in OpenOffice. You don't have to be religiously loyal to your editor, you can have many!
  \item {But for serious documents, like your thesis, \LaTeX~is the answer. Since LaTeX is a coded language, you cannot use Word to write it (that would make no sense). More on the language LaTeX is found in chapter~\ref{chap:latex}. Apart from Vi and Emacs, there are several good editors for writing LaTeX. Texmaker, Kile (Linux) and MiKTeX, TeXnicCenter (Windows) are editors specially designed for writing (and compiling) LaTeX code. My absolute favourite is VIM-LaTex, a LaTeX suite for Vi. A multitude of keyboard shortcuts, highlighting, spell check, compiling and error handling makes writing LaTeX a dream.}
    \newline
    Here is everything you need:
    \url{http://vim-latex.sourceforge.net/}
\end{itemize}

\section{Scientific writing}

\subsection{The reader}
%
Always assess your potential reader before starting to write. 
Your master thesis will probably be of most use to yourself and coming students. Do not write it to impress your supervisor. Write it so that you and others of similar knowledge base can understand it. 

\subsection{General Guidelines}
%
Scientific writing is a formal way of writing, not like this reference which is written in an informal language. Reports, papers, proposals etc. are not funny and never ever contain smileys.  Write in a precise manner and avoid unnecessary words and unscientific phrasings. By unscientific phrasing I for instance mean:
%
\begin{itemize}
  \item ``the pressure was very high''
  \item ``the simulation took a while''
\end{itemize}
%
If you struggle with writing in a formal manner, make it a routine to search through your document for words such as $\{$ \verb| such, so, very, much| $\}$. Be careful with the use of $\{$\verb|this, these, that| $\}$. When used on its own, it may not be clear to the reader what ``this'' refers to. Use instead ``This test'' or ``This problem''.% 
\begin{quote}
    \textbf{NOTE} that ``And'' and ``But'' are perfectly legal words to start a sentence with and are often useful for tying together related or contrasting statements. See Appendix~\ref{app:transitions} for a list of transitional words and phrases.
\end{quote}
%
Scientific writing does not mean that you should formulate yourself in overly complicated terms to make the impression that you are really clever. Clever people can make themselves understood in plain terms. Compare the two sentences below. 
%
\begin{quote}
	LONG:	``Triclosan has been shown to be effective in reducing bacterial growth'' \\
	SHORT:	``Triclosan is effective in reducing bacterial growth''
\end{quote}
%
Divide long sentences. Wherever you have an ``and'', check if the sentences really need to be linked together. A sentence is not poor because it is short. 
%
\begin{quote}
    \textbf{DO NOT} use contractions such as ``we'll'' and ``isn't''. Use ``we will'' and ``is not''.
\end{quote}

%-------------------------------------------
\subsection{Style}
%
Write in the \textbf{past tense} whenever you refer to your own work or that of others. Use the past tense also in the introduction. When discussing results, you may use the present tense. 
\begin{quote}
  ``We have found that\dots; Smith (1989) reported a similar result. A simple explanation of these findings is that\dots''
\end{quote}
%
Use the \textbf{active form} in general and avoid using passive verbs. The passive form inadvertently makes the text longer and duller to read. Compare the two sentences below:
%
\begin{quote}
  ACTIVE: ``{\color{red}the diluent slowed} down the flame propagation significantly''
  PASSIVE: ``the flame propagation {\color{red}was slowed} down significantly {\color{red}by the diluent}''
\end{quote}
%
The latter sentence might ``sound'' more scientific, but that is just because it is boring. The first sentence is clearer and shorter. Clarity and efficiency win over lengthy obscurity. However, the passive form is sometimes preferred, for instance where the actor in the situation is not important: 
%
\begin{quote}
``The aurora borealis {\color{red} can be observed} in the early morning hours''. 
``Two explosive gasses where studied\dots'' (instead of ``I studied\dots'')
\end{quote}

%-------------------------------------------
\subsection{Numbers, figures, tables and statistics}
%
Your thesis will contain a number of figures and tables. Please make sure that you always have the following:

\begin{enumerate}
  \item Use captions to explain the figure/table
  \item All figures and tables should have a number (preferably corresponding to the chapter and section numbering)
  \item Also explain the figure/table (with a reference to the figure/table number) in the text
  \item Avoid the use of colors to separate between simple curves. Use dottet/dash-dottet/dashed instead. This way your figure is not unreadable in black and white.
  \item Make sure that the axes are labeled including units in a readable font
  \item Use font and font size consistently
\end{enumerate}

%-------------------------------------------
\paragraph{Example}
INSERT EXAMPLE
%
Concise and correct use of numbers and statistics in scientific writing is important. A complete checklist can be found in \ref{app:num_stat}.

%-------------------------------------------
\subsection{Proofread}
%
Spell check your text. Proofread your text carefully to get rid of grammatically awkward formulations and typos. ``Your'' is spelled correctly but not if you meant ``you're''. Preferably, get someone else to proofread as well. It is easier for an independent reader to spot disambiguations and confusing statements. 

%-------------------------------------------
\subsection{Norwegian}
%
Jeg anbefaler alle å skrive oppgaven sin på engelsk. Det er god trening og vil gjøre det mulig for flere å lese oppgaven. De fleste huskereglene over gjelder også dersom du velger å skrive på norsk. Når man skriver på norsk er det lett for å bli familiær og muntlig i skrivemåten. Pass \sout{godt} på å luke ut \sout{alle} overflødige småord og adjektiv.  

%-------------------------------------------
\subsection{Useful links}

\begin{description}
  \item[Help on grammar] \url{http://depts.washington.edu/engl/askbetty/}
  \item[Dictionary and thesaurus] \url{http://dictionary.reference.com/}
  \item[Scientific writing] \url{http://abacus.bates.edu/~ganderso/biology/resources/writing/HTWgeneral.html}
  \item[Words and phrases to avoid] \url{www.sfedit.net/wordusage.pdf}
  \item[Scientific writing] \url{http://www.sportsci.org/jour/9901/wghstyle.html}
  \item[Guidelines for scientists] \url{http://writing.eng.vt.edu/index.html}
  \item[Exercises] \url{http://www.writing.engr.psu.edu/exercises/index.html}
  \item[Norwegian] \url{http://www.sokogskriv.no}
\end{description}

\paragraph{Exercise}
%
Proofread something you have written before ( < two pages) bearing in mind the dos and don'ts from this chapter. If you can change texts with someone else, that is even better. Use track changes or a red pen. We will compare the results tomorrow. 

